Skip to main content

Date Pickers

Automating date pickers is tricky since you need to perform specific actions on the date picker component to select a date.

There are multiple ways to select a date.

Input the date directly on the text field of the date picker component

Input the date

Choose the month using prev and next navigators

This would require some coding, to be able to pick the right month.

Create a function to convert the month to an integer

Function to convert Month to Integer

Based on the current month, click on the prev or next buttons to select the desired month

Also validate if the right month has been selected.

Function to select month

Here's the complete flow automated

Date Picker complete flow automated with DevAssure

Choose the month and year from a dropdown

Choose the month and year from a dropdown